package src.edu.uniquindio.vista;

import java.awt.Color;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.LineBorder;
import javax.swing.border.SoftBevelBorder;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class VentanaPrincipal extends javax.swing.JFrame implements
		ActionListener {

	


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private JLabel imagenFondo;
	private JButton ingresar;

	public VentanaPrincipal() {
		super();
		initGUI();
	}

	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(255, 255, 255));
			setResizable(false);
			getContentPane().setLayout(null);
			pack();
			this.setIconImage(new ImageIcon(getClass().getClassLoader()
					.getResource("imagenes/icono.png")).getImage());
			{
				ingresar = new JButton();
				ingresar.setBounds(413, 282, 171, 48);
				ingresar.setText("Vamos a jugar");
				ingresar.addActionListener(this);
				getContentPane().add(ingresar);
				ingresar.setFont(new java.awt.Font("Arial Black",0,14));
				ingresar.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
				ingresar.setBackground(new java.awt.Color(233,170,22));
				

			}
			{
				imagenFondo = new JLabel();
				getContentPane().add(imagenFondo);
				imagenFondo.setBounds(0, 0, 690, 458);

				ImageIcon fot = new ImageIcon(getClass().getClassLoader()
						.getResource("imagenes/principal.jpg"));
				Icon icono = new ImageIcon(fot.getImage().getScaledInstance(
						690, 484, Image.SCALE_DEFAULT));
				imagenFondo.setIcon(icono);

			}


			this.setSize(690, 484);
			this.setTitle("JUGUETEANDO EN MIS PRIMEROS PASOS");

		} catch (Exception e) {
			// add your error handling code here
			e.printStackTrace();
		}
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getSource() == ingresar) {
			VentanaIngreso inst = new VentanaIngreso();
			inst.setLocationRelativeTo(null);
			inst.setVisible(true);
			inst.reproducir("sonidos/bienv.wav");
			this.setVisible(false);
		}

	}

}
